<?php

/**
 * 法律案件模型
 */

declare (strict_types = 1);

namespace app\model\lawcase;

use app\model\BaseModel;

/**
 * 案件核心信息模型
 * 对应数据库表: oa_lawcase (案件核心信息表)
 */
class Lawcase extends BaseModel
{
    // 设置表名（不包含前缀）
    protected $name = 'lawcase';
    
    // 设置主键
    protected $pk = 'id';
    
    // 设置字段类型
    protected $type = [
        'renewal_pid' => 'integer',
        'change_pid' => 'integer',
        'uid' => 'integer',
        'cate' => 'integer',
        'types' => 'integer',
        'enterprise_id' => 'integer',
        'properties' => 'integer',
        'sign_time' => 'datetime',
        'start_time' => 'datetime',
        'end_time' => 'datetime',
        'secure_time' => 'datetime',
        'trial_months' => 'integer',
        'trial_end_time' => 'datetime',
        'trial_salary' => 'float',
        'worker_salary' => 'float',
        'status' => 'integer',
        'admin_id' => 'integer',
        'create_time' => 'int',
        'update_time' => 'int'
    ];

    // 可搜索字段
    protected $searchField = [
        'case_code',
        'contract_id',
        'court_id',
        'case_type',
        'stage',
        'status'
    ];
}